<template>
  <div class="box">
    <van-sticky>
      <van-nav-bar
        :title="type"
        left-arrow
        @click-left="onClickLeft"
      >
      </van-nav-bar>
    </van-sticky>
    <ProKind :name="type"></ProKind>
  </div>
</template>

<script>
import ProKind from './proKind.vue'
import Vue from 'vue'
import { NavBar, Sticky, Icon } from 'vant'
Vue.use(NavBar)
Vue.use(Sticky)
Vue.use(Icon)
export default {
  data () {
    return {
      type: ''
    }
  },
  components: {
    ProKind
  },
  mounted () {
    const { type } = this.$route.params
    this.type = type
  },
  methods: {
    onClickLeft () {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .van-icon-arrow-left {
  font-size: 0.22rem;
  color: #464646;
}
/deep/ .van-nav-bar__title {
  font-size: 0.18rem;
  color: #464646;
  font-weight: bold;
}
</style>
